/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.structural.bridge;

/**
 *
 * @author Malotana
 */
public abstract class Vehicle {
    public  Engine engine;
    public  int weightInkilos;
    public abstract void drive();
    public void setEngine(Engine engine){
       this.engine = engine;
    }
    
    public void reportOnspeed(int horsepower){
        int ratio = weightInkilos / horsepower;
        if(ratio <3){
            System.out.println("The vehicle is going at a fast speed");
        }else if((ratio>=3)&&(ratio<8)){
            System.out.println("the vehicle is going an average speed");
        }else 
         System.out.println("the vehicle is going with sloww speed");
    }
}
